package com.shigu.works.vo;

public class BaseResponse {
    private boolean success;
    private String msg;

    public <T extends BaseResponse> T success(){
        this.success=true;
        return (T) this;
    }

    public <T extends BaseResponse> T  success(String msg){
        this.success=true;
        this.msg=msg;
        return (T) this;
    }

    public <T extends BaseResponse> T  error(){
        this.success=false;
        return (T) this;
    }

    public BaseResponse error(String msg){
        this.success=false;
        this.msg=msg;
        return this;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
